import yagmail
import logging
def send_email():
    email=yagmail.SMTP(user="3369588519@qq.com",password="nmwzsytvaszxdbgf",host='smtp.qq.com')
    email.send(to="3369588519@qq.com",subject="测试报告",contents="我的",attachments=['baogao.html'])

def log_set():
    logging.basicConfig(filename='a.text',filemode='w+',format='%(filename)s -> %(funcName)s -> %(asctime)s')